package com.controller;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class SpringExceptionAdvice {
    @ExceptionHandler(Exception.class)
    public Result process(Exception ex){
        System.out.println("proccessing exception...");
        return new Result(404,null,"出现异常，请重试");
    }
}
